package com.azt.api.pojo;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.azt.pojo.BaseEntity;

@Table(name = "azt_area")
public class Area extends BaseEntity
{

	/* 区域名称 */
	@Column(name = "name")
    private java.lang.String name;
    
    /* 区域代码 */
	@Column(name = "code")
    private java.lang.String code;
    
    /* 父级id */
	@Column(name = "parent_id")
    private java.lang.Integer parentId;
    
    /* 顺序 */
	@Column(name = "sort_num")
    private java.lang.Integer sortNum;
    
    /* 父级区域 */
	@Transient
    private Area parent;
    
    /* 子级区域 */
	@Transient
    private List<Area> children;
    
    public java.lang.String getName()
    {
        return this.name;
    }
    
    public void setName(java.lang.String value)
    {
        this.name = value;
    }
    
    public java.lang.String getCode()
    {
        return this.code;
    }
    
    public void setCode(java.lang.String value)
    {
        this.code = value;
    }
    
    
    public java.lang.Integer getSortNum()
    {
        return this.sortNum;
    }
    
    public void setSortNum(java.lang.Integer value)
    {
        this.sortNum = value;
    }
    
    public Area getParent()
    {
        return parent;
    }
    
    public void setParent(Area parent)
    {
        this.parent = parent;
    }
    
    @Column(name="parent_id")
    public java.lang.Integer getParentId() {
		return parentId;
	}

	public void setParentId(java.lang.Integer parentId) {
		this.parentId = parentId;
	}
    
    public List<Area> getChildren()
    {
        return children;
    }
    
	public void setChildren(List<Area> children)
    {
        this.children = children;
    }
    
}
